home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 018a / mcroade3.zip / EDITMAC.BAT < prev    next >
DOS Batch File  |  1991-06-15  |  2KB  |  48 lines

  1. :
  2. :                               EditMac.Bat
  3. :            A Component of EditM.wpm System for Accessing an
  4. :                External Editor from Within WordPerfect
  5. :                   for the Purpose of Editing Macros
  6. :
  7. :              Copyright (c) 1991 by Jeffrey S. Kane, Ph.D.
  8. :
  9. :******************************************************************************
  10. :
  11. ECHO OFF
  12. %2Macrolst %2%1
  13. IF ERRORLEVEL 5 GOTO DoEdit
  14. ECHO PLEASE NOTE THE ABOVE ERROR.
  15. ECHO  
  16. ECHO When you're ready, press any key and you'll be returned to Wordperfect
  17. PAUSE where you can make another effort to specify the macro name correctly.
  18. GOTO CompGood
  19. :DoEdit
  20. :
  21. : Change the line following this comment to reflect the command to invoke your
  22. : text editor.    Do NOT change the %2%1.LST part (which refers to the file to be
  23. : edited and should be the same for all editors), but rather simply replace the
  24. : "Q" with the command to start your editor.  If your editor is not in your
  25. : PATH, be sure to precede your editor command with its path specification.
  26. : If you're using QEDIT you need not change the command line below unless
  27. : Q.EXE is not in your path, in which case you'll need to add its path
  28. : specification (e.g., C:\QEDIT\Q %2%1.LST).
  29. :
  30. :CompBad
  31. Q %2%1.LST
  32. :
  33. %2Mcompile %2%1
  34. IF ERRORLEVEL 10 GOTO COMPERR
  35. GOTO CompGood
  36. :CompErr
  37. ECHO                THE ABOVE ERROR OCCURRED DURING MACRO COMPILATION.          
  38. ECHO  
  39. ECHO               Press any key to correct the error using your editor,        
  40. ECHO                                       -OR-                                 
  41. ECHO              press CTRL-BREAK and then "Y" in response to the prompt       
  42. ECHO                            "Cancel batch job? (Y/N)"                       
  43. ECHO                            to return to WordPerfect.                       
  44. PAUSE :
  45. GOTO CompBad
  46. :CompGood
  47. ECHO ON
  48.